function UnHide( eThis )
{
	if(eThis.innerHTML =="<img src=\"/i/plus.gif\">" || eThis.innerHTML =="<IMG src=\"http://"+document.domain+"/i/plus.gif\">")
	{
		eThis.innerHTML = '<img src=/i/minus.gif>'

		eThis.parentNode.parentNode.parentNode.className = '';
	}
	else
	{
		eThis.innerHTML ="<img src=/i/plus.gif>";
		eThis.parentNode.parentNode.parentNode.className = 'cl';
	}
	return false;
}


function AjaxInit()
{
	//var target_div = document.getElementById('chat_div');

	if (window.XMLHttpRequest)
	{
		var comp_req  = new XMLHttpRequest();
	}

	else if (window.ActiveXObject)
	{
		var comp_req = new ActiveXObject("Microsoft.XMLHTTP")
	}
	return comp_req;


}


function formFilter(cndArray)
{
	var filt='filter=';
	var cndSize=cndArray.length;

	for (var i=0; i<cndSize; i++)
	{

		filt=filt+cndArray[i]+'='+cndArray[i+1]+';';
		i=i+1;
	}

	return filt;
}

function exec(conditions,field_sel,div_id,last_fld)
{
	
	comp_req=AjaxInit();

	filt=formFilter(conditions);
	url='http://'+document.domain+'/menu.php?'+filt+'&field_sel='+field_sel+'&last_fld='+last_fld+'&parent='+div_id;
	//document.getElementById('kwrd').value=url;

	comp_req.onreadystatechange = function()
	{
		if (comp_req.readyState == 4)
		{
			if (comp_req.status == 200)
			{
				var msg=comp_req.responseText;
				if (document.getElementById('img_sign'+div_id).name!='clicked')
				{
					document.getElementById('li_sub_branch'+div_id).innerHTML= document.getElementById('li_sub_branch'+div_id).innerHTML+msg;

				}
				document.getElementById('img_sign'+div_id).src='http://'+document.domain+'/i/minus.gif';
				document.getElementById('img_sign'+div_id).name='clicked';

			}
		}

	}

	if (document.getElementById('img_sign'+div_id).src!='http://'+document.domain+'/i/minus.gif')
	{


		comp_req.open("GET", url, true)
		comp_req.send(null);
		document.getElementById('li_sub_branch'+div_id).className='';
	}
	else
	{

		document.getElementById('li_sub_branch'+div_id).className='cl';
		// alert(document.getElementById('li_sub_branch'+div_id).innerHTML);
		//document.getElementById('sub_branch'+div_id).innerHTML=document.getElementById('li_sub_branch'+div_id).innerHTML;
		document.getElementById('img_sign'+div_id).src='http://'+document.domain+'/i/plus.gif';
	}



}

